//Implementation of Order (mgm / A.2)

#include "Order.h"

// constructors
Order::Order ()
        :order_id(0),
        server_id(0),
        table_id(0),
        order_date(2010,4,2),
        order_time(0,0)
{
}
        
//construction with parameter (mgm / A.2)
Order::Order(int orderID, int serverID, int tableID, Date orderDate, Time orderTime)
{
        order_id = orderID;
        server_id = serverID;
        table_id = tableID;
        order_date = orderDate;
        order_time = orderTime;
}

// utility functions (mgm / A.2)
string Order::display() const
{
        stringstream ss;
        ss << order_id << " " << server_id << " " << table_id << " " << order_date.year() << " " << order_date.month() << " " << order_date.day() << " " << order_time.hour() << " " << order_time.minute() << "\n";
        return ss.str();
}
